

const layoutMap = {}
const requireComponent = import.meta.glob('./*/index.js')
      
let arr = []
let arr2 = []
Object.keys(requireComponent).forEach((path,index) => {
    const definition = requireComponent[path]
    arr[index] = definition().then(component => {
        layoutMap[component.default.componentName] = component.default
        arr2[index] = layoutMap[component.default.componentName]
    })
})
export const loadContainers =  Promise.all(arr)
export const containerMap =  layoutMap
export const containerArr =  arr2
